package com.youlu.campus.activity.repositories;

import com.youlu.campus.activity.entity.ActivityLotteryConfigPrize;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.data.mongodb.repository.Query;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 活动抽奖 关联奖品配置
 *
 * @Description: ActivityLotteryConfigPrizeRepository
 * @Date 2025/8/4
 * @author: su
 */
public interface ActivityLotteryConfigPrizeRepository extends MongoRepository<ActivityLotteryConfigPrize, String> {

    /**
     * 根据抽奖配置id删除奖品配置列表
     *
     * @param activityId
     * @return
     */
    List<ActivityLotteryConfigPrize> deleteByLotteryId(@NotNull(message = "抽奖配置id不能为空") String activityId);

    /**
     * 根据抽奖配置id查询奖品配置列表
     *
     * @param lotteryId
     * @return
     */
    List<ActivityLotteryConfigPrize> findByLotteryId(@NotNull(message = "抽奖配置id不能为空") String lotteryId);
}
